﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title></title>
	<script type="text/javascript" src="json2.js"></script>
	<script type="text/javascript" src="xmlObject.js"></script>
	<script type="text/javascript" src="ajax.js"></script>
  <script type="text/javascript">

  	function testService(target) {
  		var serviceURI = '/CrossDomainProxy/Service.asmx/'+target;
  		new Ajax().callCSharpService(serviceURI, {
  			parameters: { 'a': 99, 'b': 'test123中文456' }
  			,timeout: 5000
				, onComplete: function(data) {
					alert(data);
				}
				, onError: function(httpStatus, message) {
					alert(httpStatus + ' error!' + message);
				}
				, onTimeout: function() {
					alert('timeout');
				}
  		});
  	}

  </script>
</head>
<body>
  <form id="form1" runat="server">
	  <div>
	  	<input type="button" value="test ws" onclick="testService('TestPost');" />
	  	<input type="button" value="test ws 1" onclick="testService('TestPost1')" />
	  	<input type="button" value="test ws 2" onclick="testService('TestPost2');" />
	  	<input type="button" value="test ws 3" onclick="testService('TestPost3');" />
	  </div>
  </form>
</body>
</html>
